package com.cntcdt.api.service.impl;

import java.util.List;

import com.cntcdt.api.db.dao.GroupDeviceDao;
import com.cntcdt.api.db.model.GroupDeviceModel;
import com.cntcdt.api.service.GroupDeviceService;

public class GroupDeviceServiceImpl implements GroupDeviceService {

	@Override
	public List<GroupDeviceModel> findByGroupId(int groupId) {
		return GroupDeviceDao.getInstance().findByGroupId(groupId);
	}

	@Override
	public GroupDeviceModel findByGroupIdAndTerminal(int groupId,
			String terminal) {
		return GroupDeviceDao.getInstance().findByGroupIdAndTerminal(groupId, terminal);
	}

	@Override
	public int insertModel(GroupDeviceModel groupDevice) {
		return GroupDeviceDao.getInstance().insert(groupDevice);
	}

	@Override
	public boolean updateModel(GroupDeviceModel groupDevice) {
		return GroupDeviceDao.getInstance().update(groupDevice);
	}

	@Override
	public GroupDeviceModel findByTerminal(String terminal) {
		return GroupDeviceDao.getInstance().findByTerminal(terminal);
	}

	@Override
	public List<GroupDeviceModel> findBySearchContent(String searchContent,long sortTime) {
		return GroupDeviceDao.getInstance().findBySearchContent(searchContent,sortTime);
	}

	@Override
	public GroupDeviceModel findByTerminalIsRepeat(String terminal) {
		// TODO Auto-generated method stub
		return GroupDeviceDao.getInstance().findByTerminalIsRepeat(terminal);
	}

}
